import React , { SFC } from 'react';
import "@scss/HistoryCard.scss";

export const HisrotyCard: SFC<IGlobalTypes.IHistoryCard> = ( { _id: id,title,pic,year,month,day,des,lunar,cardClick } ) => {
    return (
        <div className="HistoryCardRoot" data-id={ id } onClick={ () => cardClick(id) }>
            <div className="HistoryCardTitle">
                { title }
            </div>
            <div className="HistoryCardContent">
                { des }
                {/* <div className="HistoryCardContentLeft">
                    { des }
                </div>
                <div className="HistoryCardContentRight">
                    <img src={ pic } alt="HistoryCardImage" />
                </div> */}
            </div>
            <div className="HistoryCardFooter">
                <div className="HistoryCardYear">
                    { `${year}年${month}月${day}日` }
                </div>
                <div className="HistoryCardLunar">
                    { lunar }
                </div>
            </div>
        </div>
    )
}